//
//  IncomeViewController.m
//  QianJinDai
//
//  Created by wangzijian on 15/10/19.
//  Copyright (c) 2015年 xuxuan. All rights reserved.
//
#import "ThemeViewController.h"
#import "ThemeCell.h"
@interface ThemeViewController ()



@end

@implementation ThemeViewController{
    AFHTTPRequestOperationManager *_manager;
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:NO];
    self.navigationController.navigationBarHidden=YES;
}


- (void)viewDidLoad
{
    _manager = [AFHTTPRequestOperationManager manager];
    self.navigationItem.title=@"话题";
    _tableView.refreshFooterButton.hidden=NO;
    self.automaticallyAdjustsScrollViewInsets = NO;
    [self.tableView registerClass:[ThemeCell class] forCellReuseIdentifier:@"ThemeCell"];
    [self.tableView setSeparatorInset:(UIEdgeInsetsMake(0,0, 0, 0))];
    [self.tableView setRefreshHeader:YES];
    [self.tableView initData];
    [super viewDidLoad];
    __block ThemeViewController *controller = self;
    self.tableView.upBlock=^(void){
        [controller.tableView initLastData];
    };
    self.tableView.pullBlock=^(void){
        [controller.tableView initData];
        
    };
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

- (IBAction)search{ 
    SearchDisPlayerController *searchVC = [[SearchDisPlayerController alloc] init];
    searchVC.delegete = self;
    [self.navigationController pushViewController:searchVC animated:YES];
}
-(void)searchWithTitle:(NSString *)title{
    self.tableView.search=title;
    [self.tableView initData];
}
@end